package com.sz.wu.model;

import java.util.Map;

public class UserProduct extends Product {
    private Integer psc;//用户购买当前商品的数量
    private Double sum;//用户购买当前商品的总价   psc*price =sum

    public UserProduct() {
    }

    public UserProduct(Integer uid, String uname, Double price, Integer unum, String uimg, Integer psc, Double sum) {
        super(uid, uname, price, unum, uimg);
        this.psc = psc;
        this.sum = sum;
    }

    public Integer getPsc() {
        return psc;
    }

    public void setPsc(Integer psc) {
        this.psc = psc;
    }

    public Double getSum() {
        sum = psc * getPrice();
        return sum;
    }

    public void setSum(Double sum) {
        this.sum = sum;
    }
}
